package com.klz.iblog.config;

import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@EnableSwaggerBootstrapUI
@EnableSwagger2
@Configuration
public class WebMvcConfig
        implements WebMvcConfigurer
{
//    public void addResourceHandlers(ResourceHandlerRegistry registry)
//    {
//        registry.addResourceHandler(new String[] { "/swagger-ui.html" }).addResourceLocations(new String[] { "classpath:/META-INF/resources/" });
//        registry.addResourceHandler(new String[] { "/webjars/**" })
//                .addResourceLocations(new String[] { "classpath:/META-INF/resources/webjars/" });
//
//        registry.addResourceHandler(new String[] { "/doc.html" }).addResourceLocations(new String[] { "classpath:/META-INF/resources/" });
//        registry.addResourceHandler(new String[] { "/webjars/**" })
//                .addResourceLocations(new String[] { "classpath:/META-INF/resources/webjars/" });
//    }
}